//分类相关的TS类型接口
export interface ResponseData<T = any> {
  code: number
  message: string
  ok: boolean
  data: T
}
//一级分类ts类型
export interface CategoryObj {
  id: number | string
  name: string
  category1Id?: number
  category2Id?: number
}
//响应分类接口返回数据类型
export interface CategoryResponseData extends ResponseData {
  data: CategoryObj[]
}

//属性和属性值的分类ts类型接口

//已有属性值对象ts类型接口
export interface AttrValue {
  id?: number
  valueName: string
  attrId?: number
  isEdit?: boolean
}
//已有属性值对象数组ts类型
export type AttrValueList = AttrValue[]

//已有属性对象
export interface Attr {
  id?: number
  attrName: string
  categoryId: number | string
  categoryLevel: number | string
  attrValueList: AttrValueList
  attrIdAndValueId?: string
}

//已有属性对象的数组
export type AttrList = Attr[]
//属性接口返回的数据ts类型
export interface AttrResponseData extends ResponseData {
  data: Attr[]
}
